package com.hanamaki.struct;

import java.util.Scanner;

public class ContinueDemo02 {
    public static void main(String[] args) {

       // window + v
        // 循环录入Java课的学生成绩，统计分数大于等于 80 分的学生比例
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入班级人数：");
        int personCount = scanner.nextInt();
        /*定义汇总的变量*/
        double score_sum = 0;
        /* 统计 大于 80分的学生的人数*/
        int e80 = 0;

        for (int i = 1; i <= personCount; i++) {
            System.out.println("请输入班级中第" + i + "个人的成绩：");
            double score = scanner.nextDouble();
            if (score < 80) {
                continue;
            }
            e80++;
        }

        System.out.println("班级中大于80分的人的比例为：" + (double)e80 / personCount * 100+"%");
    }
}
